{% extends 'base.html' %}

{% block content %}
<div class="container mt-4">
    <h2><i class="fas fa-users"></i> 领养人信息</h2>
    <a href="{% url 'home' %}" class="btn btn-outline-primary mb-3">
        <i class="fas fa-arrow-left"></i> 返回首页
    </a>
    
    <table class="table table-striped table-bordered">
        <thead class="thead-dark">
            <tr>
                <th>ID</th>
                <th>姓名</th>
                <th>性别</th>
                <th>联系方式</th>
                <th>出生年月</th>
                <th>地址</th>
                <th>捐款记录</th>
            </tr>
        </thead>
        <tbody>
            {% for person in persons %}
            <tr>
                <td>{{ person.personid }}</td>
                <td>{{ person.pname }}</td>
                <td>{{ person.gender }}</td>
                <td>{{ person.phone }}</td>
                <td>{{ person.birthday }}</td>
                <td>{{ person.address }}</td>
                <td>{{ person.donate_record }}</td>
            </tr>
            {% empty %}
            <tr>
                <td colspan="7" class="text-center">暂无领养人信息</td>
            </tr>
            {% endfor %}
        </tbody>
    </table>
</div>
{% endblock %}